function sayHello(name, word) {
    console.log(`${name}对${this.name}说：“${word}”`);
}

let proxy = new Proxy(sayHello, {
    name: "proxy",
    /**
    * 拦截函数的调用、call和apply操作
    * @param {*} target 目标对象
    * @param {*} thisArg 被调用时的上下文对象
    * @param {*} argumentsList 被调用的参数数组
    */
    apply(target, thisArg, argumentsList) {
        console.log("target = ", target);
        console.log("thisArg = ", thisArg);
        console.log("拦截")

        // target.apply(thisArg,argumentsList);
        Reflect.apply(target,thisArg,argumentsList);
    }
});


// sayHello("奉先","你好")
// proxy("奉先", "你好");
proxy.call({name:"张三"},"奉先", "你好")